<?php

#<editor-fold defaultstate="collapsed" desc="CCore::Using">
CCore::Using('base.container');
#</editor-fold>

abstract class ACoreSocketConfig extends ACoreBaseContainer
{
	/**
	 * @param	string	$sHost
	 * @param	int		$iPort
	 * @param	int		$iConnectTimeOut
	 * @param	int		$iSocketTimeOut
	 * @return	ACoreSocketConfig
	 */
	public function __construct($sHost, $iPort, $iConnectTimeOut, $iSocketTimeOut)
	{
		CCore::CheckTypes(array('$sHost', '$iPort', '$iConnectTimeOut', '$iSocketTimeOut'));
		
		parent::__construct();

		$this->aContainer['Host'] = $sHost;
		$this->aContainer['Port'] = $iPort;
		$this->aContainer['ConnectTimeOut'] = $iConnectTimeOut;
		$this->aContainer['SocketTimeOut'] = $iSocketTimeOut;
	}
}

abstract class ACoreSocketConfigWithLoginAndPassword extends ACoreSocketConfig
{
	/**
	 * @param	string	$sHost
	 * @param	int		$iPort
	 * @param	string	$sLogin
	 * @param	string	$sPassword
	 * @param	int		$iConnectTimeOut
	 * @param	int		$iSocketTimeOut
	 * @return	ACoreSocketConfigWithLoginAndPassword
	 */
	public function __construct($sHost, $iPort, $sLogin, $sPassword, $iConnectTimeOut, $iSocketTimeOut)
	{
		CCore::CheckTypes(array('$sHost', '$iPort', '$sLogin', '$sPassword', '$iConnectTimeOut', '$iSocketTimeOut'));
		
		parent::__construct($sHost, $iPort, $iConnectTimeOut, $iSocketTimeOut);

		$this->aContainer['Login'] = $sLogin;
		$this->aContainer['Password'] = $sPassword;
	}
}
